package com.cwh.service;

import java.io.InputStream;
import java.util.List;
import java.util.Map;

import org.activiti.engine.repository.Deployment;
import org.activiti.engine.repository.ProcessDefinition;
import org.activiti.engine.task.Comment;
import org.activiti.engine.task.Task;

import com.cwh.entity.Baoxiaobill;

public interface WorkFlowService {
	//zip发布流程
	void saveNewDeploy(InputStream in, String processName);
	//查看部署表act_re_deployment
	List<Deployment> findReDeploymentList();
	//查看流程表信息act_re_procdef
	List<ProcessDefinition> findReProcdefList();
	//删除根据部署id删除部署流程
	void deleteDeploymentById(String deploymentId);
	//我的待办事务 根据用户名称查act_ru_task表 
	List<Task> findRuTaskListByUsername(String username);
	//启动流程
	void saveStartProcess(String processKey, Integer baoxiaobillId,String username);
	//根据taskId获取报销(baoxiaobill)记录
	Baoxiaobill findBaoxiaoBillByTaskId(String taskId);
	//根据taskId获取历史审批(act_hi_comment)记录
	List<Comment> findCommentByTaskId(String taskId);
	//根据taskId获取当前活动结点的线对象集合,前端渲染
	List<String> findOutComeListByTaskId(String taskId);
	//办理任务
	void submitTask(long id, String taskId, String comment, String outcome, String username);
	//使用请假单ID，查询历史的批注信息
	List<Comment> findCommentByBaoxiaoBillId(long id);
	//获取资源文件表（act_ge_bytearray）中资源图片输入流InputStream
	InputStream findImageInputStream(String deploymentId, String imageName);
	//通过taskId查询act_re_execution记录
	ProcessDefinition findProcessDefinitionByTaskId(String taskId);
	//查看当前活动，获取当期活动对应的坐标x,y,width,height，将4个值存放到Map<String,Object>中
	Map<String, Object> findCoordingByTask(String taskId);
	//通过bussinessKey查找act_ru_task表
	Task findTaskByBussinessKey(String bUSSINESS_KEY);
}
